<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="app">
    <p>这是p标签</p>
    <my-component></my-component>
  </div>
  <script src="lib/vue.js"></script>
  <script>
    Vue.component('my-component', { 
      template: '<div>这是我们全局注册的组件</div>'
    });

    // 根实例
    new Vue({
      el: '#app',
      data: {

      }
    })
  </script>
</body>
</html>